.class public Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;
.super Ljava/lang/Object;
.source "EdgeIntersection.java"

# interfaces
.implements Ljava/lang/Comparable;


# instance fields
.field public coord:Lcom/vividsolutions/jts/geom/Coordinate;

.field public dist:D

.field public segmentIndex:I


# direct methods
.method public constructor <init>(Lcom/vividsolutions/jts/geom/Coordinate;ID)V
    .locals 1

    .line 59
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 60
    new-instance v0, Lcom/vividsolutions/jts/geom/Coordinate;

    invoke-direct {v0, p1}, Lcom/vividsolutions/jts/geom/Coordinate;-><init>(Lcom/vividsolutions/jts/geom/Coordinate;)V

    iput-object v0, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->coord:Lcom/vividsolutions/jts/geom/Coordinate;

    .line 61
    iput p2, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->segmentIndex:I

    .line 62
    iput-wide p3, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->dist:D

    return-void
.end method


# virtual methods
.method public compare(ID)I
    .locals 5

    .line 83
    iget v0, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->segmentIndex:I

    const/4 v1, -0x1

    if-ge v0, p1, :cond_0

    return v1

    :cond_0
    const/4 v2, 0x1

    if-le v0, p1, :cond_1

    return v2

    .line 85
    :cond_1
    iget-wide v3, p0, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->dist:D

    cmpg-double p1, v3, p2

    if-gez p1, :cond_2

    return v1

    :cond_2
    cmpl-double p1, v3, p2

    if-lez p1, :cond_3

    return v2

    :cond_3
    const/4 p1, 0x0

    return p1
.end method

.method public compareTo(Ljava/lang/Object;)I
    .locals 3

    .line 73
    check-cast p1, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;

    .line 74
    iget v0, p1, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->segmentIndex:I

    iget-wide v1, p1, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->dist:D

    invoke-virtual {p0, v0, v1, v2}, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->compare(ID)I

    move-result p1

    return p1
.end method
